class ReplicatorGenerator < Rails::Generator::Base
  def manifest
    record do |m|
      m.file 'controllers/syncs_controller.rb', 'app/controllers/syncs_controller.rb'
      m.directory 'app/views/syncs'
      m.file 'views/perform_sync.rhtml', 'app/views/syncs/perform_sync.rhtml'
      m.file 'views/perform_upgrade.rhtml', 'app/views/syncs/perform_upgrade.rhtml'
      m.file 'public/bigrotation2.gif', 'public/images/bigrotation2.gif'
      m.directory 'lib/daemons'
      m.file 'daemons/replicator.rb', 'lib/daemons/replicator.rb'
      m.file 'daemons/upgrade.rb', 'lib/daemons/upgrade.rb'
      m.migration_template 'migrate/create_replicas.rb', 'db/migrate'
      m.readme 'INSTALL'
    end
  end
  
  def file_name
    "create_replicas"
  end
end